var mongoose=require('mongoose');
var PrivateSchema=new mongoose.Schema(
	{

		assistant:{type:String},
		guestname:{type:String},
		mobile:{type:String},
		schedule:{
			type:Date,
		},
		// scheduletestone:{
		// 	type:Date,
		// 	default:Date()
		// }
	});
	

PrivateSchema.pre('save',function(next){
	console.log('保存成功');
	next();
});

PrivateSchema.statics={
	fetch:function(cb){
		return this.find({}).sort('').exec(cb);
	},
	findById:function(id,cb){
		return this.find({_id:id}).sort('').exec(cb);
	}
}

module.exports=PrivateSchema;


